package com.batchbrake.queue;

import java.util.List;

import com.batchbrake.jobs.JobProc;
import com.batchbrake.main.EFile;

public class QueueEntity {
	public static final String PRESET_HIGH_PROFILE = "High Profile";
	public static final String PRESET_NORMAL = "Normal";
	public static final String PRESET_UNIVERSAL = "Universal";
	
	private EFile input = null;
	private EFile output = null;
	private List<EFile> subtitles = null;
	private List<String> langs = null;
	private List<String> encodings = null;
	private String preset = null;
	
	private JobProc proc = null;
	private boolean jobDone = false;
	
	public EFile getInput() {
		return input;
	}
	public void setInput(EFile input) {
		this.input = input;
	}

	public EFile getOutput() {
		return output;
	}
	public void setOutput(EFile output) {
		this.output = output;
	}
	
	public List<EFile> getSubtitles() {
		return subtitles;
	}
	public void setSubtitles(List<EFile> subtitles) {
		this.subtitles = subtitles;
	}
	
	public List<String> getLangs() {
		return langs;
	}
	public void setLangs(List<String> langs) {
		this.langs = langs;
	}
	
	public List<String> getEncodings() {
		return encodings;
	}
	public void setEncodings(List<String> encodings) {
		this.encodings = encodings;
	}
	
	public String getPreset() {
		return preset;
	}
	public void setPreset(String preset) {
		this.preset = preset;
	}
	
	public JobProc getProc() {
		return proc;
	}
	public void setProc(JobProc proc) {
		this.proc = proc;
	}
	public boolean isJobDone() {
		return jobDone;
	}
	public void setJobDone(boolean jobDone) {
		System.out.println("setJobDone(" + jobDone + ")");
		this.jobDone = jobDone;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((input == null) ? 0 : input.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		QueueEntity other = (QueueEntity) obj;
		if (input == null) {
			if (other.input != null)
				return false;
		} else if (!input.equals(other.input))
			return false;
		return true;
	}
}
